package com.example.day06;

import java.util.ArrayList;
import java.util.Objects;

public class MyArrayList extends ArrayList {

    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        System.out.println(myArrayList.size());
        myArrayList.removeRange(1,4);
        System.out.println(myArrayList.size());
        myArrayList.set(0,100);
        System.out.println(myArrayList.get(0));
        Object[] ints = myArrayList.toArray();
        for (Object anInt : ints) {
            System.out.println(anInt);
        }
        myArrayList.trimToSize();
    }

}
